import React from 'react';
import { connect } from 'react-redux';
import reducer, { getList, filter } from '../../store/user/coupon';
import Coupon from '../../components/user/Coupon';
import { injectReducer } from '../../store/reducers';
import store from '../../store/createStore';
const mapStateToProps = state => ({
  list: state.coupon.list,
  datasource: state.coupon.datasource,
  loading: state.coupon.loading
});

const mapDispatchToProps = {
  getList,
  filter
};

injectReducer(store, { key: 'coupon', reducer });
export default connect(
  mapStateToProps,
  mapDispatchToProps
)(Coupon);
